import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class Show {
    private String showId;
    private Movie movie;
    private Hall hall;
    private LocalDateTime time; // 放映时间
    private double price; // 票价
    private List<Ticket> tickets = new ArrayList<>(); // 该场次的所有票

    public Show(String showId, Movie movie, Hall hall, LocalDateTime time, double price) {
        this.showId = showId;
        this.movie = movie;
        this.hall = hall;
        this.time = time;
        this.price = price;
    }

    // 检查场次是否可修改（无售票时可修改）
    public boolean isModifiable() {
        return tickets.isEmpty();
    }

    // getter和setter
    public String getShowId() {
        return showId;
    }

    public Movie getMovie() {
        return movie;
    }

    public Hall getHall() {
        return hall;
    }

    public LocalDateTime getTime() {
        return time;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public List<Ticket> getTickets() {
        return tickets;
    }
}
    